package com.example.demo1.mapper;

import com.example.demo1.model.Message;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2025-01-20
 * Time: 14:39
 */
@Mapper
public interface MessageInfoMapper {
    @Select("select * from message_info where delete_flag = 0")
    List<Message> queryMessage();

    @Insert("insert into message_info (`from`, `to`, `message`) values (#{from},#{to},#{message})")
    Integer insertMessage(Message message);

}
